import { createRouter, createWebHistory } from 'vue-router'

import Layout from '@/views/Layout.vue'
import Home from '@/views/Home.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: 'Layout',
      component: Layout,
      children: [
        {
          path: "",
          name: 'Home',
          component: Home,
        },
        {
          name: 'Category',
          path: "category",
          component: () => import('@/views/Category.vue')
        }
      ]
    },
    {
      name: 'Login',
      path: "/login",
      component: () => import('@/views/Login.vue')
    }
  ],
})

export default router
